[libc++] Teach is_integral, is_[un]signed and make_[un]signed about __[u]int128_t This commit also adds tests for std::numeric_limits<__[u]int128_t>. Reviewed in http://llvm-reviews.chandlerc.com/D2917 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@204849 91177308-0d34-0410-b5e6-96231b3b80d8 
diff --git a/include/__config b/include/__config index a5081dd..5998ed0 100644 --- a/include/__config +++ b/include/__config 
@@ -485,6 +485,10 @@  typedef unsigned int char32_t;  #endif // _LIBCPP_HAS_NO_UNICODE_CHARS   +#ifndef __SIZEOF_INT128__ +#define _LIBCPP_HAS_NO_INT128 +#endif +  #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT    template <bool> struct __static_assert_test; 
diff --git a/include/type_traits b/include/type_traits index 660ed86..8f18aa5 100644 --- a/include/type_traits +++ b/include/type_traits 
@@ -325,6 +325,10 @@  template <> struct __libcpp_is_integral<unsigned long> : public true_type {};  template <> struct __libcpp_is_integral<long long> : public true_type {};  template <> struct __libcpp_is_integral<unsigned long long> : public true_type {}; +#ifndef _LIBCPP_HAS_NO_INT128 +template <> struct __libcpp_is_integral<__int128_t> : public true_type {}; +template <> struct __libcpp_is_integral<__uint128_t> : public true_type {}; +#endif    template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_integral  : public __libcpp_is_integral<typename remove_cv<_Tp>::type> {}; @@ -1247,7 +1251,13 @@  __type_list<signed int,  __type_list<signed long,  __type_list<signed long long, +#ifndef _LIBCPP_HAS_NO_INT128 + __type_list<__int128_t, +#endif  __nat +#ifndef _LIBCPP_HAS_NO_INT128 + > +#endif  > > > > > __signed_types;    typedef @@ -1256,7 +1266,13 @@  __type_list<unsigned int,  __type_list<unsigned long,  __type_list<unsigned long long, +#ifndef _LIBCPP_HAS_NO_INT128 + __type_list<__uint128_t, +#endif  __nat +#ifndef _LIBCPP_HAS_NO_INT128 + > +#endif  > > > > > __unsigned_types;    template <class _TypeList, size_t _Size, bool = _Size <= sizeof(typename _TypeList::_Head)> struct __find_first; @@ -1340,6 +1356,10 @@  template <> struct __make_signed<unsigned long, true> {typedef long type;};  template <> struct __make_signed< signed long long, true> {typedef long long type;};  template <> struct __make_signed<unsigned long long, true> {typedef long long type;}; +#ifndef _LIBCPP_HAS_NO_INT128 +template <> struct __make_signed<__int128_t, true> {typedef __int128_t type;}; +template <> struct __make_signed<__uint128_t, true> {typedef __int128_t type;}; +#endif    template <class _Tp>  struct _LIBCPP_TYPE_VIS_ONLY make_signed @@ -1369,6 +1389,10 @@  template <> struct __make_unsigned<unsigned long, true> {typedef unsigned long type;};  template <> struct __make_unsigned< signed long long, true> {typedef unsigned long long type;};  template <> struct __make_unsigned<unsigned long long, true> {typedef unsigned long long type;}; +#ifndef _LIBCPP_HAS_NO_INT128 +template <> struct __make_unsigned<__int128_t, true> {typedef __uint128_t type;}; +template <> struct __make_unsigned<__uint128_t, true> {typedef __uint128_t type;}; +#endif    template <class _Tp>  struct _LIBCPP_TYPE_VIS_ONLY make_unsigned